package com.sirun.cn.fca.module.main.home.temp.control.block;

import com.tencent.cloud.iov.util.ObjectUtils;

public class OperationBlockItem implements IOperationBlockItem {
    private final CharSequence mCarLocationText;
    private final CharSequence mCarTimeString;

    public OperationBlockItem(CharSequence carLocationText, CharSequence carTimeString) {
        mCarLocationText = carLocationText;
        mCarTimeString = carTimeString;
    }

    @Override
    public CharSequence getCarLocationText() {
        return mCarLocationText;
    }

    @Override
    public CharSequence getCarTimeString() {
        return null;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        OperationBlockItem that = (OperationBlockItem) o;
        return
                ObjectUtils.equals(mCarLocationText, that.mCarLocationText) &&
                        ObjectUtils.equals(mCarTimeString, that.mCarTimeString);
    }

    @Override
    public int hashCode() {
        return ObjectUtils.hash(mCarLocationText, mCarTimeString);
    }
}
